<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html lang="UTF-8">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/font-awesome.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/main.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/carousel.css">
    <style>
        .tree li {
            list-style-type: none;
            cursor: pointer;
        }

        table tbody tr:nth-child(odd) {
            background: #F4F4F4;
        }

        table tbody td:nth-child(even) {
            color: #C00;
        }
    </style>
</head>

<body>
<div class="navbar-wrapper ">
    <%--动态导入另一个jsp页面，作用：将公共使用的部分提取出来，然后使用动态导入
              动态导入是不会导入include页面的编译指令的，而是仅仅将被导入页面的body内容插入本页面。--%>
    <jsp:include page="admin-header.jsp"></jsp:include>
</div>
<div class="container-fluid">
    <div class="row">
        <%--动态导入另一个jsp页面，作用：将公共使用的部分提取出来，然后使用动态导入
                 动态导入是不会导入include页面的编译指令的，而是仅仅将被导入页面的body内容插入本页面。--%>
        <jsp:include page="admin-left.jsp"></jsp:include>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h1 class="panel-title" id="msg"><i class="glyphicon glyphicon-th">指定维修负责人</i>
                        <div style="float: right">
                            <button onclick="location.replace('/tbOrder/searchOrders');" class="btn btn-success">返回
                            </button>
                        </div>
                    </h1>
                </div>

                <div class="box ui-draggable" id="mainBox">
                    <div class="mBd" style="padding-top:10px;">
                        <div class="row">
                            <c:forEach var="tbLeader" items="${tbLeaders}">
                                <div class="col-md-3">
                                    <div class="thumbnail">
                                        <img style="width: 100px;height: 100px"
                                             src="${pageContext.request.contextPath}/resources/img/tx.jpg"/>
                                        <div class="caption">
                                            <h3 class="break">
                                                <a href="javascript:void(0);"
                                                   onclick="setLeader(${tbOrder.orderId},${tbLeader.leaderId})"
                                                   class="btn btn-success btn-xs">
                                                    <i class=" glyphicon glyphicon-check"></i><span>指定我</span>
                                                </a>
                                            </h3>
                                            <p>
                                            <div style="float:left;"><i
                                                class="glyphicon glyphicon-user"></i> ${tbLeader.leaderName}
                                            </div>
                                            <div style="float:right;"><i
                                                class="glyphicon glyphicon-phone"></i>${tbLeader.leaderTel}
                                            </div>
                                            </p>
                                            <br>
                                            <div>
                                                <i class="glyphicon glyphicon-tags"></i> &nbsp;
                                                专长：&nbsp;&nbsp;${tbLeader.leaderAdv}
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </c:forEach>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script src="${pageContext.request.contextPath}/resources/jquery/jquery-2.1.1.min.js"></script>
<script src="${pageContext.request.contextPath}/resources/bootstrap/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/resources/script/docs.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("[data-toggle='tooltip']").tooltip();

        $(".list-group-item").click(function () {
            if ($(this).find("ul")) {
                $(this).toggleClass("tree-closed");
                if ($(this).hasClass("tree-closed")) {
                    $("ul", this).hide("fast");
                } else {
                    $("ul", this).show("fast");
                }
            }
        });
    })

    function setLeader(orderId, leaderId) {
        //alert(tbOrderId+"=========="+type);
        if (confirm("确认操作？")) {
            location.replace("/tbOrder/setLeaderId?orderId=" + orderId + "&leaderId=" + leaderId)
        }
    }
</script>
</html>
